<?php


namespace app\api\controller;


use app\common\controller\Api;

use app\common\model\ScoreLog;
use think\Request;


class Score extends Api
{
    protected $noNeedLogin = ['*'];

    public function log(Request $request)
    {
        if (!$request->isPost()) {
            $this->error('ＭＵＳＴ　ＢＥ　POST');
        }
        $req = $request->post();

        $list = ScoreLog::where(['user_id' => $this->auth->id])->page($req['current'], $req['every'])->order('id desc')->select();
        //存在

        $this->success('ok', $list);

    }

}
